-
Notifications
You must be signed in to change notification settings - Fork 2
Unit Test Cleanup #1227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit Test Cleanup #1227
Conversation
…shapefile to use it more direclty. Repairs various bugs mostly in setting up unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A couple questions to think about.
@@ -268,7 +268,7 @@ public void AnalyticalWithRegUnreg_ScenarioResults(double expectedResidentialMea | |||
//Act | |||
double actualResidentialMeanEAD = scenarioResults.MeanExpectedAnnualConsequences(impactAreaID1, residentialDamageCategory); | |||
double actualCommercialMeanEAD = scenarioResults.MeanExpectedAnnualConsequences(impactAreaID1, commercialDamageCategory); | |||
double tolerance = 0.19; | |||
double tolerance = 0.2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we reconsider whether this test is helpful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely. Where did the expected values come from?
@@ -256,32 +256,13 @@ private Inventory CreateInventory() | |||
return inventory; | |||
} | |||
|
|||
|
|||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have a similar test somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessarily. Truth is this test hadn't been run in a long time, and the case it was testing throws an exception way before it looks like it did in this test. A lot of processing is kicked off right in the constructor of IASD. We might reconsider that, because constructors can't fail as gracefully as we can on other methods.
For now, this test just isn't useful, and should go.
public class StructureDataValidatorShould | ||
{ | ||
static PointShapefile pointShapefile = new PointShapefile(Resources.StringResourcePaths.pathToNSIShapefile); | ||
private static PointFeatureCollection pointShapefile = GetFeatures(Resources.StringResourcePaths.pathToNSIShapefile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Documented remaining comments in separate issues. Merging because the overall benefit of having these tests updated is necessary to keep the next release on schedule. |
No description provided.